package com.example.card;

import com.example.card.domain.order.AddOilOrder;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CardConstant {
    public static final int ENABLE_CHARGE = 1;
    public static final int ENABLE_STORE_CODE = 1 << 1;
    public static final int ENABLE_OIL_CODE = 1 << 2;
    public static final int ENABLE_DEDUCT_COIN = 1 << 3;
    public static final int ENABLE_DEDUCT_V_OIL = 1 << 4;
    public static final int ENABLE_RED_PACKET = 1 << 5;


    public static final int OIL_LABEL_0 = 1;
    public static final int OIL_LABEL_92 = 1 << 1;
    public static final int OIL_LABEL_95 = 1 << 2;
    public static final int OIL_LABEL_ALL = -1;


    public static final int STATUS_INIT = 1;
    public static final int STATUS_NO_BIND = 2;
    public static final int STATUS_NORMAL = 3;
    public static final int STATUS_DISABLE = 4;
    public static final int STATUS_FROZEN = 5;
    public static final int STATUS_COMPLETED = 6;


    public static final int CARD_RED = 1;
    public static final int CARD_RED_YU_YUE = 2;
    public static final int CARD_BLUE = 3;
    public static final int CARD_BLUE_0 = 4;
    public static final int CARD_INSTALLMENT = 5;

    /**
     * 钢镚（1%抵扣率）、
     * 铜币（2%抵扣率）、
     * 银币（3%抵扣率）、
     * 金币（5%抵扣率）、
     * 白金币（10%抵扣率）
     * 钻石币（100%抵扣率）
     */
    public static final int OIL_COIN_STEEL = 1 << 1;
    public static final int OIL_COIN_COPPER = 1 << 2;
    public static final int OIL_COIN_SILVER = 1 << 3;
    public static final int OIL_COIN_GOLD = 1 << 4;
    public static final int OIL_COIN_PLATINA = 1 << 5;
    public static final int OIL_COIN_DIAMOND = 1 << 6;


    public static final Map<Integer, Float> OIL_COIN_DEDUCT_MAP = new HashMap<>();

    public static final List<Integer> OIL_COIN_DEDUCT_SORT = new ArrayList<>();
    public static final HashMap<Integer, String> oilLabelMap = new HashMap<>();

    static {
        OIL_COIN_DEDUCT_MAP.put(OIL_COIN_STEEL, 0.01f);
        OIL_COIN_DEDUCT_MAP.put(OIL_COIN_COPPER, 0.02f);
        OIL_COIN_DEDUCT_MAP.put(OIL_COIN_SILVER, 0.02f);
        OIL_COIN_DEDUCT_MAP.put(OIL_COIN_GOLD, 0.05f);
        OIL_COIN_DEDUCT_MAP.put(OIL_COIN_PLATINA, 0.10f);
        OIL_COIN_DEDUCT_MAP.put(OIL_COIN_DIAMOND, 1f);

        OIL_COIN_DEDUCT_SORT.add(OIL_COIN_DIAMOND);
        OIL_COIN_DEDUCT_SORT.add(OIL_COIN_PLATINA);
        OIL_COIN_DEDUCT_SORT.add(OIL_COIN_GOLD);
        OIL_COIN_DEDUCT_SORT.add(OIL_COIN_SILVER);
        OIL_COIN_DEDUCT_SORT.add(OIL_COIN_COPPER);
        OIL_COIN_DEDUCT_SORT.add(OIL_COIN_STEEL);


        oilLabelMap.put(OIL_LABEL_0, "0#");
        oilLabelMap.put(OIL_LABEL_92, "92#");
        oilLabelMap.put(OIL_LABEL_95, "95#");
        oilLabelMap.put(OIL_LABEL_ALL, "所有标号");
    }


    public static void saveAddOilOrder(AddOilOrder addOilOrder) {
    }
}
